<?php
/*
 * @ https://EasyToYou.eu - IonCube v11 Decoder Online
 * @ PHP 7.2 & 7.3
 * @ Decoder version: 1.1.6
 * @ Release: 10/08/2022
 */

// Decoded file for php version 71.
namespace app\Common\model;

class LongbingClientInfo extends \app\BaseModel
{
    protected $name = "longbing_card_client_info";
    public function getClientInfo($filter)
    {
        $result = $this->where($filter)->find();
        if(!empty($result)) {
            $result = $result->toArray();
        }
        return $result;
    }
    public function listClientData($filter, $field = NULL)
    {
        $result = $this->where($filter);
        if(empty($field) && is_array($field)) {
            $result = $result->field($field);
        }
        $result = $result->select();
        if(!empty($result)) {
            $result = $result->toArray();
        }
        return $result;
    }
    public function getClientData($filter, $field = NULL)
    {
        $result = $this->where($filter);
        if(empty($field) && is_array($field)) {
            $result = $result->field($field);
        }
        $result = $result->find();
        if(!empty($result)) {
            $result = $result->toArray();
        }
        return $result;
    }
    public function updateClientInfo($filter, $data)
    {
        $data["update_time"] = time();
        $result = $this->where($filter)->update($data);
        return !empty($result);
    }
}

?>